package com.jhw.ymcc.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author jhw
 * @since 2022-10-10
 */
@TableName("t_user_code")
public class UserCode extends Model<UserCode> {

    private static final long serialVersionUID = 1L;

    public static final String CODE_USED = "1";

    public static final String CODE_NOT_USED = "0";

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 推荐码
     */
    private String code;
    /**
     * 用户id
     */
    private Long userId;
    @TableField("qr_url")
    private String qrUrl;
    /**
     * 状态
     */
    private String state;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getQrUrl() {
        return qrUrl;
    }

    public void setQrUrl(String qrUrl) {
        this.qrUrl = qrUrl;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "UserCode{" +
        ", id=" + id +
        ", code=" + code +
        ", userId=" + userId +
        ", qrUrl=" + qrUrl +
        ", state=" + state +
        "}";
    }
}
